package edu.gznu.ics.fast.pulsar.controller.prestoacc.picController;

import edu.gznu.ics.fast.pulsar.model.vo.prestoacc.pic.CompareDetailVO;
import edu.gznu.ics.fast.pulsar.service.prestoacc.picService.CompareDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by ydw on 2018/3/26.
 */
@Controller
public class CompareDetailController {

    @Autowired
    CompareDetailService compareDetailService;

    @RequestMapping(method = RequestMethod.POST, value = "/queryByMain", produces = "application/json;charset=UTF-8")
    @ResponseBody
    public List<CompareDetailVO> queryByMain(@RequestBody CompareDetailVO obj){
        System.out.println("taskId*********************");
        BigDecimal compId=obj.getCompId();

        //BigDecimal taskId=new BigDecimal(taskIdInt);
        System.out.println("compId="+compId);
        List<CompareDetailVO> list=compareDetailService.queryByMain(compId);
        System.out.println("list1="+list.indexOf(1));
        return list;
    }


}
